/* eslint-disable react-hooks/rules-of-hooks */
import React from 'react';
import { useLocation, useNavigate } from 'react-router-dom';

import "../../../../styles/HuYueYue/zhibiaodetail.scss"

interface props {

}

function zhibiaodetail(props: props) {

    const { state: record } = useLocation()

    let navigate = useNavigate()
    let goback = () => {
        navigate(-1)
    }
    return (
        <div className='zhibiao-detail'>
            <h2>
                指标详情  
                <button className="goback" onClick={() => { goback() }}>返回</button>
            </h2>
            <div className='center'> 
            <ul>
                <li>指标名称  <span>{record.name}</span></li>
                <li>指标类型  <span>{record.type}</span></li>
                <li>指标规则  <span>{record.rule}</span></li>
                <li>上限  <span>{record.limit}</span></li>
                <li>备注  <span>{record.auther}</span></li>
            </ul>
            </div>
        </div>
    );
}

export default zhibiaodetail;